//
//  JTViewController.m
//  JTBaseLib
//
//  Created by kenter on 07/03/2019.
//  Copyright (c) 2019 kenter. All rights reserved.
//

#import "JTViewController.h"
#import <JTBaseLib/JTBaseLib.h>
#import <TZImagePickerController/TZImagePickerController.h>

@interface JTViewController ()

@end

@implementation JTViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake((KWIDTH - 100)/2.0, (KHEIGHT - 40)/2.0, 100, 40);
    button.backgroundColor = [UIColor redColor];
    [button setTitle:@"TZImagePicker" forState:UIControlStateNormal];
    [button addTarget:self action:@selector(selectImages:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)selectImages:(UIButton *)sender
{
    TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] init];
    imagePickerVc.iconThemeColor = [UIColor colorWithRed:31 / 255.0 green:185 / 255.0 blue:34 / 255.0 alpha:1.0];
    imagePickerVc.showPhotoCannotSelectLayer = YES;
    imagePickerVc.cannotSelectLayerColor = [[UIColor whiteColor] colorWithAlphaComponent:0.8];
    [self presentViewController:imagePickerVc animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
